package com.muyu.system.danmo.converter;

import com.muyu.system.danmo.domain.PayOrder;
import com.muyu.system.danmo.dto.PayDTO;
import com.muyu.system.danmo.dto.PayServiceDTO;
import com.muyu.system.danmo.dto.RefundDTO;
import com.muyu.system.danmo.dto.RefundServiceDTO;
import com.muyu.system.danmo.vo.*;
import org.mapstruct.Mapper;
import org.mapstruct.MappingInheritanceStrategy;
import org.mapstruct.ReportingPolicy;

/**
 * 类型转换
 * @author Administrator
 */
@Mapper(
        componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        // 新增以下配置
        unmappedSourcePolicy = ReportingPolicy.WARN,
        mappingInheritanceStrategy = MappingInheritanceStrategy.AUTO_INHERIT_FROM_CONFIG// 可选：全局配置
)
public interface PayMapper {

    PayServiceDTO to(PayDTO payDTO);

    PayVO to(PayServiceVO payServiceVO);

    PayOrder to(PayServiceDTO payServiceDTO);

    PayServiceVO to(PayResultVO resultVO);

    RefundServiceDTO to(RefundDTO refundDTO);

    RefundResultVO to(RefundResultServiceVO refundResultServiceVO);
}
